<template>
  <view class="top_data">
    <view class="top_data_title">{{ title }}</view>
    <view class="top_data_list">
      <view v-for="(item, index) in list" :key="index" class="top_data_list_item">
        <view class="top_data_list_item_num">{{ item.num }}</view>
        <view class="top_data_list_item_name">{{ item.name }}</view>
      </view>
    </view>
  </view>
</template>

<script>
export default {
  name: 'TopData',
  props: {
    title: {
      type: String,
      default: ''
    },
    list: {
      type: Array,
      default: () => ([])
    }
  }
};
</script>

<style lang="less" scoped>
.top_data{
  color: #ffffff;
  padding: 12px 40px;
  .top_data_title{
    height: 35px;
    font-size: 17px;
    font-weight: 500;
    font-family: PingFangSC, PingFangSC-Medium;
  }
  .top_data_list{
    display: flex;
    justify-content: space-between;
    .top_data_list_item_num{
      font-size: 22px;
      font-family: ArialMT, ArialMT-Regular;
    }
    .top_data_list_item_name{
      padding-top: 8px;
      color: rgba(255,255,255,0.85);
      font-size: 12px;
      font-family: PingFangSC, PingFangSC-Regular;
      font-weight: 400;
    }
  }
}
</style>
